package com.cos.lession76sb2.web.controller;

import com.cos.lession76sb2.entity.Emp;
import com.cos.lession76sb2.services.EmpServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: COS
 * @time: 2022/10/9 14:17
 * @description:
 */
@RestController
@RequestMapping("/emp")
public class EmpController {
    @Autowired
    private EmpServices empServices;

    @GetMapping("/getAll")
    public List<Emp> getAll(){
        return empServices.getAll();
    }
}
